home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1999 / MacHack 1999.toast / The Hacks / BlueBox Spy / Blue Box Daemon / source / CTCPResponderThread.h < prev    next >
Encoding:
Text File  |  1998-08-06  |  1.6 KB  |  53 lines  |  [TEXT/CWIE]

  1. // ===========================================================================
  2. //    CTCPResponderThread.h        ©1995-1998 Metrowerks Inc. All rights reserved.
  3. // ===========================================================================
  4.  
  5. #pragma once
  6.  
  7. #include <LThread.h>
  8. #include <LListener.h>
  9.  
  10. #include <LTCPEndpoint.h>
  11. #include "CTerminalPane.h"
  12. #include "CSimpleTCPServer.h"
  13.  
  14. class CTCPResponder;
  15.  
  16. // ===========================================================================
  17. //        • CTCPResponderThread
  18. // ===========================================================================
  19. //    The thread that actually does the work of the Server interpreter.
  20. //    Note that typed characters (i.e. data sent to the remote host
  21. //    are NOT handled by this object.) Only incoming data are processed
  22. //    here.
  23.  
  24. class CTCPResponderThread :    public PP_PowerPlant::LThread,
  25.                             public PP_PowerPlant::LListener {
  26.  
  27.  
  28. public:
  29.                         CTCPResponderThread(
  30.                                 PP_PowerPlant::LTCPEndpoint*            inNetworkEndpoint,
  31.                                 CTerminalPane*            inTerminalPane,
  32.                                 CTCPResponder*                inResponderMaster,
  33.                                 CSimpleTCPServer*            inMasterServer);
  34.     virtual                ~CTCPResponderThread();
  35.  
  36.     void                StartDisconnect();
  37.  
  38.     virtual void        ListenToMessage(
  39.                             PP_PowerPlant::MessageT        inMessage,
  40.                             void            *ioParam);
  41.  
  42. protected:
  43.     virtual void*        Run();
  44.  
  45.     PP_PowerPlant::LTCPEndpoint*    mEndpoint;            // network endpoint
  46.     CTerminalPane*                    mTerminalPane;        // terminal display for this connection
  47.     CTCPResponder*                    mResponderMaster;    // Responder object that spawned this thread
  48.     CSimpleTCPServer*                mMasterServer;        // Master EP that issued the Listen();
  49.     bool                            mContinue;
  50.     bool                            mInDisconnect;
  51.  
  52. };
  53.